package com.example.firstjavamqtt.service.log;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.firstjavamqtt.model.dto.log.DeviceLogDto;
import com.example.firstjavamqtt.model.log.DeviceLog;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

public interface DeviceLogService extends IService<DeviceLog> {
    //存储日志
    void saveDeviceLog(String string, HttpServletRequest request);
    void saveDeviceLog(String string);
    //根据id删除某条日志
    void deleteDeviceLogById(int id);
    //删除某个设备id的日志
    void deleteDeviceLogByDeviceId(String deviceId);
    //分页获取所有的设备日志
    Page<DeviceLog> getAllDeviceLog(int pageNum, int limit);
    //根据设备类型查询所有设备日志
    Page<DeviceLog> getAllDeviceLogByDeviceType(String deviceType, int pageNum, int limit);
    //根据设备ID查询所有设备日志
    Page<DeviceLog> getAllDeviceLogByDeviceId(String deviceId, int pageNum, int limit);
    //根据ID查询所有设备日志
    DeviceLog getDeviceLogById(int id);
    //根据DTO查询设备日志
    Page<DeviceLog> getDeviceLog(DeviceLogDto deviceLogDto, int pageNum, int limit);
    //根据红外设备id保存其在redis里的日志
    void saveInfraredByDeviceId(String deviceId);
    //根据设备类型删除日志
    void deleteDeviceByDeviceType(String deviceType);
    //根据批量id删除日志
    void deleteDeviceLogByBatchId(ArrayList<Integer> batchId);
}
